package com.forekonw.demo5;

public class Animal {
        String name;
        int age;
        String zool;
        String type;

        public void sleep(){
            System.out.println("sleeping......");
        }

        public void eat(){
            System.out.println("eating......");
        }

        public void sport(){
            System.out.println("sporting......");
        }

        public void game(){
            System.out.println("gameing......");
        }


    public static void main(String[] args) {
        Animal ani1 = new Animal();
        ani1.age = 2;
        ani1.name= "xiaohou";
        ani1.type ="monkey";
        ani1.zool = "shenyang";

        ani1.eat();
        ani1.game();
        ani1.sleep();
        ani1.sport();

        System.out.println(ani1.age+"---"+ani1.name+"---"+ani1.type+"---"+ani1.zool);

        Animal ani2 = new Animal();
        ani2.name = "tanxin";
        ani2.age = 2;
        ani2.type = "elephent";
        ani2.zool = "shenyang";

        ani2.sleep();

        System.out.println(ani2.name+ani2.age+ani2.type+ani2.zool);

    }
}
